package model.container;

import model.Lector;

/**  
 * 
 * @author Dimitri Verschueren
 * 
 * and Dimitri Breuval
 *
 */

public class Lectoren 

{

	public Lector[] lijstLectoren; 
	
	// Default constructor
	public Lectoren()
	{
	this.lijstLectoren=new Lector[1];
	}
	
	// Constructor overload with Lector as param
	public Lectoren(Lector inputLectoren)
	{
	this.lijstLectoren=new Lector[1];
	this.lijstLectoren [0]= inputLectoren;
	}
	
	// Method to add a Lector to the lijstInschrijvingen via the copyArrayMethod
	public void addLectorMethod(Lector inputLector) 
	{   
		if(this.lijstLectoren.length!=1)
		{
			//Lector[] arrayCopy = copyArrayMethod(this.lijstLectoren);
    
			Lector[] lac = new Lector [lijstLectoren.length];
			System.arraycopy (this.lijstLectoren, 0 ,lac, 0, this.lijstLectoren.length);
    
			this.lijstLectoren = new Lector[lac.length+1];
		
		    System.arraycopy(lac, 0,this.lijstLectoren, 0, lac.length);
		    this.lijstLectoren[lac.length]=inputLector;
		}
		else
		{
			this.lijstLectoren[0]= inputLector;
		}
    }
}